ci: pr automation use github app token#769
Merged
Merged
Conversation
|
Limit the minted GitHub App token to the permissions each automation job actually needs (contents:write to push the branch, pull-requests:write to open the PR) instead of inheriting the App's blanket installation permissions, per zizmor. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Switch the PR-creating automation workflows from the default
GITHUB_TOKENto a GitHub App token (minted viaactions/create-github-app-token).Affected:
.github/workflows/update.yml—download,types, andschemajobs.github/workflows/sync-readme-versions.yml—syncjobWhy
PRs (and pushes) created with the repository's
GITHUB_TOKENdo not trigger new workflow runs — this is GitHub's recursion guard:As a result, the automated payload / types / GraphQL-schema / README-version PRs were opening with no
test,check-dist, orzizmorchecks running, so they could merge unvalidated. Using a GitHub App token makes the bot a distinct actor, so CI runs on the resulting PRs.Notes
client-idinput (the legacyapp-idstill works but is deprecated).GITHUB_TOKENuses are intentionally left unchanged: thepnpm run downloadscript and the GraphQL-schemacurlinupdate.yml.bcd2ba4/v3.2.0) to match repo convention.Required repo configuration
This will fail until a GitHub App is wired up. Create/install an App with Contents: read & write and Pull requests: read & write, then add:
APP_CLIENT_ID— the App's Client IDAPP_PRIVATE_KEY— the App's private key (PEM)🤖 Generated with Claude Code